package com.swipemaster.levels;

import com.swipemaster.elements.Element;

/**
 * Level where player has to stay amount of milliseconds alive.
 */
public class SurvivalLevel extends Level
{
	/** Number of seconds that user must survive to win this level. */
	private int secondsToWin;
	
	public SurvivalLevel()
	{
	}

	public SurvivalLevel(Element player, int secondsToWin)
	{
		super(player);
		this.secondsToWin = secondsToWin;
	}

	@Override
	boolean isWin()
	{
		return (System.currentTimeMillis() - 1000 * secondsToWin) > startTime;
	}

}
